The present invention relates to a distributed data base system which controls a plurality of database systems to reflect update of data in one database to other databases using a replica of the updated data such that the contents of the databases in the plurality of database systems are coincident with each other, and more particularly to a method of detecting the presence or absence of contention, which may occur when data is updated, to enable respective databases to update data independently of each other.
As a form of a distributed database system, there is known a so-called replication, i.e., a distributed data updating technique which provides a replica of an original database in a database system to other database systems so as to permit the respective database systems to asynchronously update their databases. The replication is a technique for reflecting update or deletion performed in a primary database, which is an original database on a network, to secondary databases. When certain data is updated in the primary database, an update contention may occur if data corresponding to the certain data is also updated or deleted in a secondary database.
A method of determining whether or not an update contention occurs is disclosed, for example, in "Lotus NOTES RELEASE 3.1J System Manager's Guide" (published by Lotus Co.,), pp. 10-17. In this document, each data is provided therein with a field for storing an update counter, such that the value of the update counter is incremented when the data is updated. When data is replicated, an update contention is determined from a comparison of values of associated update counters in the data contained in the primary and secondary databases.
Also, an article entitled "Distributed RDB Updating Techniques--Replication Function Effective in Trigger/Stored Procedure", Network Computing, February 1994, pp. 16-21, discloses that update information of transactions performed in an original database system is transferred to a destination database system when replication is performed to permit the destination database to update its own database based on the update information.
The former prior art technique has a problem involved in its determination of an update contention based on a comparison of the values of the update counters provided in respective data. Specifically, when data is replicated independently among a plurality of systems, a contention of data cannot be detected if the number of times of updates is different in these systems. Also, while the latter prior art technique discloses the transfer of update information in units of transactions from an original database system, it does not describe any specific method of determining an update contention. In addition, the latter prior art technique implies problems in that data in a database in the destination database system does not have the latest contents until the reflection of the update information is completed in the destination database, and that it takes a long time to complete the reflection of the update information.